//
//  JKConsole.swift
//  JKConsole
//
//  Created by 姜奎 on 2020/6/19.
//  Copyright © 2020 JK. All rights reserved.
//

import Foundation

class JKConsole {
   static func run(arguments: [String])  {
        var argumentExtion = arguments
        argumentExtion.removeFirst()
        if argumentExtion.first == "clone" {
            CloneCommon().run(options: ConsoleOptions(arguments: argumentExtion))
        } else if argumentExtion.first == "cloneProject" {
            CloneProjectCommon().run(options: ConsoleOptions(arguments: argumentExtion))
        } else if argumentExtion.first == "pull" {
            PullCommon().run(options: ConsoleOptions(arguments: argumentExtion))
        } else if argumentExtion.first == "pull_all" {
            PullAllCommon().run(options: ConsoleOptions(arguments: argumentExtion))
        } else if argumentExtion.first == "add_tag" {
            AddTagCommon().run(options: ConsoleOptions(arguments: argumentExtion))
        } else if argumentExtion.first == "del_tag" {
            DeleteTagCommon().run(options: ConsoleOptions(arguments: argumentExtion))
        } else if argumentExtion.first == "build" {
            BuildCommon().run(options: ConsoleOptions(arguments: argumentExtion))
        } else if argumentExtion.first == "buildFramework" {
            BuildFrameworkCommon().run(options: ConsoleOptions(arguments: argumentExtion))
        } else if argumentExtion.first == "buildXCFramework" {
            BuildXCFrameworkCommon().run(options: ConsoleOptions(arguments: argumentExtion))
        } else if argumentExtion.first == "buildStatic" {
            BuildStaticCommon().run(options: ConsoleOptions(arguments: argumentExtion))
        } else if argumentExtion.first == "archive" {
            ArchiveCommon().run(options: ConsoleOptions(arguments: argumentExtion))
        }  else if argumentExtion.first == "upload" {
            UploadCommon().run(options: ConsoleOptions(arguments: argumentExtion))
        } else if argumentExtion.first == "oneKeyUpload" {
            OneKeyUploadCommon().run(options: ConsoleOptions(arguments: argumentExtion))
        } else {
            HelperCommon().run(options: ConsoleOptions(arguments: argumentExtion))
        }
    }
}

